<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>center-4</title>
    <style>
        body{
            display: flex;
            align-items: center;/*定义body的元素垂直居中*/
            justify-content: center;/*定义body的元素水平居中*/
            height: 100vh;
        }
        .one{
            width:200px;
            height:200px;
            border:1px solid blue;
        }
    </style>
</head>
<body>
    <div class="one"></div>
</body>
</html>
